interface Items {
    [propName: string]: string
}

export default (items: Items = {}): string => {
    const keys: Array<string> = Object.keys(items);
    const str = keys.map(key => `${key}=${items[key]}`).join(`&`);
    return !!keys.length ? `?${str}` : ``;
}